/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package walmdach;
import com.jme3.scene.shape.Line;
/**
 *
 * @author mafolz
 */
public class Edge {
    protected Point[] points = new Point[2];
    protected double angle;
    
    // Constructors
    public Edge(double angle){
        this.angle = angle;
    }
    public Edge(double angle, Point left_point, Point right_point){
        this.angle = angle;
        addLeftPoint(left_point);
        addRightPoint(right_point);
    }
    
    public void addLeftPoint(Point left_point){
        System.out.println(left_point);
        System.out.println("\tAdded Left Point to Edge");
        
        this.points[0] = left_point;
        left_point.edges.add(this);
        return;
    }
    
    public void addRightPoint(Point right_point){
        System.out.println(right_point);
        System.out.println("\tAdded Right Point to Edge");
        this.points[1] = right_point;
        right_point.edges.add(this);
        return;
    }
    
    public Line toLine(){
        return new Line(points[0].toVector3f(), points[1].toVector3f());
    }
}
